package tms.sync.service;

import java.util.Map;

public class TmsSyncCommonService {

	public Map<?, ?> setDefInsertData(Map mapInsertData) {
		mapInsertData.put("CRT_USER_ID", this.getId());
		mapInsertData.put("CRT_DTHR", this.getDthr());
		mapInsertData.put("CRT_PGM_ID", this.getPgmId());
		mapInsertData.put("CRT_IP_MAC", this.getIpMac());
		
		return mapInsertData;
	}
	
	public String setIfNullCheck(Map MapData, String Col){
		String outData = "";
		if(MapData.get(Col) == null || MapData.get(Col) == ""){
			outData = "";
		}else{
			outData = MapData.get(Col).toString();
		}
		return outData;
	}
	
	public String setIfNullCheckOpenDt(Map MapData, String Col){
		String outData = "";
		if(MapData.get(Col) == null || MapData.get(Col) == ""){
			outData = "19000101";
		}else{
			outData = MapData.get(Col).toString();
		}
		return outData;
	}
	
	private String getId() {
		return "batch admin";
	}
	private String getDthr() {
		return "20150212";
	}
	private String getPgmId() {
		return "batch pgm";
	}
	private String getIpMac() {
		return "";
	}
}
